GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 75229a...a07b43 )
by Sebastian
02:01
created

domReady.js ➔ domReady   A

Complexity

Conditions 5
Paths 4

Size

Total Lines 24
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
cc 5
eloc 17
c 3
b 0
f 0
nc 4
nop 1
dl 0
loc 24
rs 9.0833

1 Function

Rating   Name   Duplication   Size   Complexity  
A domReady.js ➔ ... ➔ listener 0 7 2
1
'use strict';
2
3
function domReady(fn) {
4
    var fns = [],
5
        listener,
6
        doc = typeof document === 'object' && document,
7
        hack = doc && doc.documentElement.doScroll,
8
        domContentLoaded = 'DOMContentLoaded',
9
        loaded = doc && (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(doc.readyState);
10
11
    if (!loaded && doc) {
12
        doc.addEventListener(domContentLoaded, listener = function () {
13
            doc.removeEventListener(domContentLoaded, listener);
14
            loaded = 1;
15
            while (listener = fns.shift()) {
16
                listener();
17
            }
18
        })
19
    }
20
21
    if (loaded) {
22
        setTimeout(fn, 0);
23
    } else {
24
        fns.push(fn);
25
    }
26
}
27